<%
page = CInt(SelfRequestNumber("page"))
st=request("st")
if page = 0 then
	strSQL = "select top 5 * from contact order by id desc"
else
	strSQL = "SELECT TOP 5 * FROM contact WHERE ( id NOT IN (SELECT TOP " & CStr(5 * page) & " id FROM contact ORDER BY id desc)) ORDER BY id desc"
end if

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, dbconnection, adOpenDynamic, 3
Dim TextArray1(5)
Dim PicArray1(5)
bNext = True

for i = 0 to ubound(TextArray1) 
	if not rs.eof then
		PicArray1(i)="<img src="""&rs("Pic")&""" border=""0"" width=""100"" height=""100"" alt="""" />"
		TextArray1(i)="联系电话："&rs("Tel")&"<br /><br />联系地址："&rs("Addr")&"<br /><br />邮政编码："&rs("mail")&"<br /><br />Email地址：<A href=""mailto:"&rs("email")&""">"&rs("Email")&"</A><br /><br />联系地址："&rs("Addr")&"<br /><br />QQ：<A target='_blank' href=""tencent://message/?uin="&rs("QQ")&"&Site=http://www.powgame.com""><img border='0' SRC='http://wpa.qq.com/pa?p=1:"&rs("QQ")&":1' alt='点击这里给我发消息'></A><br /><br />联系人："&rs("contmen")
		rs.movenext
	else
		TextArray1(i)="&nbsp;"
		PicArray1(i)="&nbsp;"
		bNext = False
	end if
next
set rs = nothing
%>
		<hr style="border:1px dashed black; height:1px;">
		<%if TextArray1(0) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(0)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(0)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(1) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(1)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(1)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(2) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(2)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(2)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(3) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(3)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(3)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(4) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(4)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(4)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
		<%if TextArray1(5) <> "&nbsp;" then%>
		<div class="GameCommodityDiv1">
			<div class="GamePicDiv"><%=PicArray1(5)%></div>
			<div class="GameTextDiv" align="left"><%=TextArray1(5)%></div>
		</div>
		<hr style="border:1px dashed black; height:1px;">
		<%end if%>
